package com.xinsoft.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinsoft.common.CountBean;
import com.xinsoft.entity.dto.ScmSaleNoticeParam;
import com.xinsoft.entity.po.ScmSaleNotice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinsoft.entity.vo.ScmSaleNoticeListVo;
import com.xinsoft.entity.vo.ScmSaleNoticeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ZYM
 * @description 针对表【scm_sale_notice(发货通知)】的数据库操作Mapper
 * @createDate 2023-07-18 19:23:17
 * @Entity com.xinsoft.entity.po.ScmSaleNotice
 */
public interface ScmSaleNoticeMapper extends BaseMapper<ScmSaleNotice> {

    IPage<ScmSaleNoticeListVo> findPageListByParam(Page<ScmSaleNoticeListVo> page,@Param("param") ScmSaleNoticeParam param);
    List<ScmSaleNoticeListVo> findPageListByParam(@Param("param") ScmSaleNoticeParam param);

    ScmSaleNoticeVo getById(Integer id);

    /**
     * 获取发货通知已用的源单物料数量
     * @param sourceIds  源单ids
     * @param sourceType 源单类型
     */
    List<CountBean> getUsedCountOfSaleNotice(@Param("sourceIds") List<Integer> sourceIds, @Param("sourceType") Integer sourceType);
}




